//
//  ViewController.swift
//  QNN
//
//  Created by zhenyu on 17/3/30.
//  Copyright © 2017年 qianshengqian. All rights reserved.
//

import UIKit

class ViewController: UIViewController {
  
  override func viewDidLoad() {
    super.viewDidLoad()
    view.backgroundColor = UIColor.white
    // 解决UITabelView,UIScrollerView 向下偏移20PX
    automaticallyAdjustsScrollViewInsets = true
  }
  
  override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)
  }
  
  override func viewDidDisappear(_ animated: Bool) {
    super.viewDidDisappear(animated)
  }
  
  override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
  }
  
  deinit {
    debugPrint("ViewController deinit")
  }
  
  // MARK: - Navigation Push And Pop
  func popBack() {
    _ = navigationController?.popViewController(animated: true)
  }
  
  func dimiss() {
    dismiss(animated: true, completion: nil)
  }
  
  func popToRoot() {
   _ = navigationController?.popToRootViewController(animated: true)
  }
  
}
